#include <ESP32Servo.h>
#include <freertos/FreeRTOS.h>
#include <freertos/task.h>
#include <Arduino.h>
#include "imu.h"
#include "fly_control.h"
#include"MCT8316ADriver.h"
int servo_pin3 = 48; //偏航舵机
int servo_pin4 = 47; //俯仰舵机
Servo myservo3;  // J3,舵机
Servo myservo4;  // J4，舵机
void motor_set()
{
  myservo3.setPeriodHertz(50);    // standard 50 hz servo
  myservo3.attach(servo_pin3, 900, 2100); // attaches the servo on pin 18 to the servo object
  myservo4.setPeriodHertz(50);    // standard 50 hz servo
  myservo4.attach(servo_pin4, 900, 2100); // attaches the servo on pin 18 to the servo object  
}
void vehicletask(void *pvParameters){
  
  while(1){
    
   myservo3.write(90);
   myservo4.write(90);


     vTaskDelay(1/ portTICK_PERIOD_MS);  // 延时1毫秒
  }
   

  
}
